<template>
  <el-container>
    <!-- 头部区域 -->
    <el-header>
      <el-page-header
        style="font-weight: 800"
        @back="goPage(orderUrl)"
        v-if="getPageHeadVisible"
      ></el-page-header>
      <el-avatar :size="size"><i class="el-icon-user-solid"></i></el-avatar>
      <!-- 头部导航 -->
      <el-menu
        :default-active="'1'"
        mode="horizontal"
        text-color="#333"
        active-text-color="rgb(51,153,255)"
      >
        <el-menu-item index="1" @click="goPage('/home')">首页</el-menu-item>
        <el-menu-item index="2" @click="goPage('/quillEditor')"
          >发布</el-menu-item
        >
        <el-menu-item index="3" @click="goPage('/login')">退出</el-menu-item>
      </el-menu>
    </el-header>
    <!-- 主题部分路由 -->
    <el-main>
      <router-view></router-view>
    </el-main>
    <!-- 底部版权部分 -->
    <el-footer>
      <p>Copyright © 2021 金职云技术有限公司</p>
      <p>Powered by .NET 5.0 on Kubernetes</p>
    </el-footer>
  </el-container>
</template>
<script>
export default {
  data() {
    return {
      orderUrl: "/home",
    };
  },
  methods: {
    goPage(url) {
      this.$router.push(url);
    },
  },
  computed: {
    getPageHeadVisible() {
      return this.$route.path !== "/passages";
    },
  },
};
</script>

<style lang="less" scoped>
.el-container {
    background-image: url(../assets/bg.gif);
}
.el-header {
  width: 1200px;
  margin: 0 auto;
}
.el-page-header {
  float: left;
  margin-top: 23px;
  margin-left: 50px;
}
.el-menu {
  float: right;
  color: #333;
}
.el-main {
  margin: 0;
  padding: 0;
}
.el-avatar {
  float: right;
  margin-top: 10px;
}
.el-footer {
  width: 100%;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.pic {
  width: 100%;
  height: 300px;
  background-image: url(../assets/Supervise/pic.jpg);
  background-position: center;
  background-size: cover;
  position: relative;
  transition: all 0.2s linear;
  .tags {
    width: 650px;
    position: absolute;
    top: 30%;
    left: 30%;
    h3 {
      color: white;
      margin-bottom: 15px;
    }
    li {
      float: left;
      margin: 15px;
    }
    .el-button::before {
      content: "#";
      padding-right: 3px;
    }
    .choosed {
      background-color: rgb(125, 172, 241);
      color: #fff;
    }
  }
}
.filter::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.filter:hover {
  filter: blur(3px);
  transition: all 0.2s linear;
}
</style>